<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCarouselPicSortCategoriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('c_carousel_pic_sort_categories')) {
            Schema::create('c_carousel_pic_sort_categories', function (Blueprint $table) {
                $table->increments('id')->comment('自增ID');
                $table->string('name')->comment('分类名称');
                $table->timestamps();
                $table->comment = '轮播图分类';
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_carousel_pic_sort_categories');
    }
}
